<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> 
<html>
    <head>
        <title><?php echo __('Doseyeh') ?></title>
        <link rel="stylesheet" type="text/css" media="screen" href="<?php echo stylesheet_path('styles.css') ?>"/>
        <link rel="stylesheet" type="text/css" media="screen" href="<?php echo stylesheet_path('ui-lightness/jquery-ui-1.7.3.custom.css') ?>"/>
        <link rel="stylesheet" type="text/css" media="screen" href="<?php echo stylesheet_path('jquery.ui.selectmenu.css') ?>"/>
        <link rel="stylesheet" type="text/css" media="screen" href="<?php echo stylesheet_path('jquery.fancybox-1.3.4.css') ?>"/>
        <link id="page_favicon" href="<?php echo image_path('favicon.ico') ?>" rel="icon" type="image/x-icon" />
        <script src="<?php echo javascript_path('jquery-1.7.1.min.js') ?>" type="text/javascript"></script>
        <script src="<?php echo javascript_path('jquery-ui.min.js') ?>" type="text/javascript"></script>
        <script src="<?php echo javascript_path('jquery.ui.selectmenu.js') ?>" type="text/javascript"></script>
        <script src="<?php echo javascript_path('jquery.fancybox-1.3.4.pack.js') ?>" type="text/javascript"></script>
        <script src="<?php echo javascript_path('jquery.raty.min.js') ?>" type="text/javascript"></script>
        <script src="<?php echo javascript_path('jquery.cookie.js') ?>" type="text/javascript"></script>
        <script type="text/javascript">
            String.prototype.trim = function() {return this.replace(/^\s+|\s+$/g,"");}
        </script>
        <script type="text/javascript">
            var _gaq = _gaq || [];
            _gaq.push(['_setAccount', 'UA-30057075-1']);
            _gaq.push(['_trackPageview']);
            (function() {
                var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
                ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
                var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
            })();
        </script>
        <script type="text/javascript">  
            window.onscroll = scroll;
            function scroll(){
                if(window.pageYOffset < 68){
                    if(window.pageYOffset > 10){
                        _fact = window.pageYOffset / 68;
                        $('.bar_logo').removeClass('text_only');
                        $('.bar_logo').css('opacity',_fact);
                    }else{
                        _fact2 = window.pageYOffset / 10;
                        _fact2 = Math.abs(1 - _fact2);
                        $('.bar_logo').addClass('text_only');
                        $('.bar_logo').css('opacity',_fact2);
                    }
                }
                if(window.pageYOffset > 68){
                    $('.bar_logo').css('opacity','1');
                    $('.bar_logo').removeClass('text_only');
                }
            }
           
        </script>
    </head>
    <body>
        <div id="fb-root"></div>
        <script>(function(d, s, id) {
            var js, fjs = d.getElementsByTagName(s)[0];
            if (d.getElementById(id)) return;
            js = d.createElement(s); js.id = id;
            js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
            fjs.parentNode.insertBefore(js, fjs);
        }(document, 'script', 'facebook-jssdk'));</script>
        <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>

        <div class="top_bar">
            <div class="main_wrapper">
                <a href="<?php echo url_for('@localized_homepage') ?>"><div class="bar_logo text_only"></div></a>
                <div class="user_menu">
                    <?php $gu = $sf_user->getGuardUser(); ?>
                    <?php $username = $gu->getUsername() ?>
                    <?php $local_path = sfConfig::get('sf_web_dir') . '/uploads/profile_pictures/' . $username . '_thumb.jpg' ?>
                    <?php if (file_exists($local_path)) { ?>
                        <?php $ftime = filemtime($local_path) ?>
                        <?php $path = get_resized_image('36', '36', $local_path) ?>
                    <?php } else { ?>
                        <?php $path = image_path('demo_upload.gif') ?>
                    <?php } ?>
                    <?php if ($sf_user->getCulture() == 'en') { ?>
                        <?php $other_lang_name = 'عربي' ?>
                        <?php $other_lang_url = url_for('@localized_homepage?sf_culture=ar') ?>
                    <?php } else { ?>
                        <?php $other_lang_name = 'English' ?>
                        <?php $other_lang_url = url_for('@localized_homepage?sf_culture=en') ?>
                    <?php } ?>
                    <div class="home"><a href="<?php echo url_for('@homepage') ?>"><?php echo __('Home') ?></a></div>

                    <div class="menu_user_pic"><img id="small_user_pic" width="36" height="36" src="<?php echo $path ?>?_=<?php echo $ftime ?>"/></div>
                    <div class="top_user_profile">
                        <a href="<?php echo url_for('@user_profile_personal_info') ?>"><?php echo $gu->getFirstName() ?></a> 
                    </div>
                    <div class="top_user_arrow">
                        <a href="javascript:;" onclick="$('#user_drop_menu').slideToggle(300)"></a> 
                    </div>
                    <div class="user_drop_menu" id="user_drop_menu" style="display:none">
                        <ul>
                            <li>
                                <a href="<?php echo url_for('@user_profile_my') ?>"><?php echo __('My Doseyeh') ?></a>
                            </li>
                            <li>
                                <a href="<?php echo url_for('@user_profile_personal_info') ?>"><?php echo __('My Account') ?></a>
                            </li>
                            <li>
                                <a href="<?php echo url_for('@user_profile_my_balance') ?>"><?php echo __('My Balance') ?></a>
                            </li>
                            <li class="last">
                                <a href="<?php echo url_for('@sf_guard_signout') ?>"><?php echo __('Logout') ?></a>
                            </li>
                        </ul>
                    </div>
                </div>
                <div class="clear"></div>
                <!--
                <ul class="top_menu">
                    <li>
                        <a href="<?php echo url_for('@homepage') ?>"><?php echo __('Home') ?></a>
                    </li>
                    <li>
                        <a href="#"><?php echo __('About us') ?></a>
                    </li>
                    <li>
                        <a href="#"><?php echo __('Support') ?></a>
                    </li>
                    <li>
                        <a href="#"><?php echo __('Careers') ?></a>
                    </li>
                    <li>
                        <a href="#"><?php echo __('Contact us') ?></a>
                    </li>
                    <li>
                        <a href="#"><?php echo __('Arabic') ?></a>
                    </li>
                </ul>
                -->
            </div>
        </div>
        <div class="main_wrapper">
            <div class="top_wrapper">
                <a href="<?php echo url_for('@localized_homepage') ?>"><div class="left_logo"></div></a>
                <div class="right_top_search_wrap">
                    <form action="" method="get">
                        <input class="top_search" type=text />
                        <input type="image" class="search_go" src="<?php echo image_path('search_go.gif') ?>"/>
                    </form>
                </div>
            </div>
            <div class=clear></div>
            <?php echo $sf_content ?>
            <script>$('select').selectmenu({style:'dropdown'});</script>
            <script>$('.fancybox').fancybox({'padding':'0'});</script>
        </div>
        <div class="footer">
            <div class="footer_contents">
                <div class="bottom_cr">2012 © All Rights Reserved. Doseyeh.com</div>
                <?php include_component('doseyeh', 'stats') ?>
                <?php include_component('cms', 'menu', array('class' => 'footer_menu_first', 'index' => 1)) ?>
                <?php include_component('cms', 'menu', array('class' => 'footer_menu', 'index' => 2)) ?>
                <?php include_component('cms', 'menu', array('class' => 'footer_menu', 'index' => 3)) ?>
                <?php include_component('cms', 'menu', array('class' => 'footer_menu', 'index' => 4)) ?>
                <?php include_component('cms', 'menu', array('class' => 'footer_menu', 'index' => 5)) ?>

            </div>
        </div>
    </body>

</html>